import * as actionTypes from './constants';
import { getArticleMessage } from '../../services';

const changeArticleMessage = (res) => ({
    type:actionTypes.CHANGE_ARTICLE_MESSAGE,
    articleMessage: res.data
})

export const getArticleMessageAction = () => {
    return dispatch => {
        getArticleMessage().then(res => {
            console.log();
            dispatch(changeArticleMessage(res));
        })
    }
}